package com.xiaoq.shop.repository;

import com.xiaoq.shop.entity.SKUEntity;
import com.xiaoq.vo.PagingVo;

import java.util.List;

/**
 * Created by chenjh on 2017/11/3.
 */
public interface ISKURepository {

    /**
     *  根据店Id 以及 规格 获取 票 SKU 列表
     * @param shopId
     * @param specificationNameList
     * @return
     */
    List<SKUEntity> getTicketSkuList(String shopId, List<String> specificationNameList, PagingVo pagingVo, Integer saleState);

    /**
     * @param shopId 店的
     * @param specificationNameList
     * @param pagingVo 分页参数
     * @param saleStatus 见ConstantUtil
     * @return 总数量
     */
    long getTicketSkuListCount(String shopId, List<String> specificationNameList, PagingVo pagingVo, Integer saleStatus);

    /**
     * 保存 skuEntity
     * @param skuEntity
     * @return
     */
    boolean save(SKUEntity skuEntity);

    /**
     * 修改 skuEntity
     * @param skuEntity
     * @return
     */
    boolean update(SKUEntity skuEntity);

    /**
     *  根据SKUEntity中的（某些）属性获取SKUEntity
     * @param skuEntity
     * @return
     */
    SKUEntity getSKUByCommon(SKUEntity skuEntity);

    /**
     *  根据shopId和spuCode List 获取SKUEntity List
     * @param shopId 店ID
     * @param spuCodeList spuCode List
     * @param saleState 是否上架
     * @return
     */
    List<SKUEntity> getSkuList(String shopId, List<String> spuCodeList,Integer saleState);

    /**
     *  根据InterId和shopId删除SKUEntity
     * @param InterId 讲解员ID
     * @param shopId 
     * @returnSKU
     */
    boolean deleteByInterIdAndShopId(String InterId, String shopId);


    /**
     * 根据 shopId skuIdList删除
     * @param shopId 店ID
     * @param skuIdList shuId List
     * @return
     */
    boolean deleteSkuByShopIdAndSkuIds(String shopId, List<String> skuIdList);

    /**
     *  修改sku sale state
     * @param shopId 店ID
     * @param skuIdList sku Id List
     * @param saleState 见ConstantUtil
     * @return
     */
    boolean updateSkuSaleStateByShopIdAndSkuIds(String shopId, List<String> skuIdList, Integer saleState);

}
